const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  css: {
    loaderOptions: {
      sass: {
        // 支持多个scss样式文件，
        //老版本sass-loader的options参数名为data,
        //新版本sass-loader把data改为了prependData
        prependData: `@import "@/assets/css/global.less";`
      }
    }
  },
  devServer: {
	  client:{
		  overlay:false
	  },
    https: false,
    port:8081,
    proxy: {
      // '/api': {
      //   // target: 'http://192.168.0.113:9004',
      //   // target: 'http://43.138.110.35:8080',
      //   target: 'http://192.168.0.111:9004',
      //   changeOrigin: true,
      //   pathRewrite: {
      //     '^/api': ''
      //   }
      // }
      '/hongyun-training':{
        // target: 'http://192.168.0.121:19999',
        //   target: 'http://192.168.0.119:19999',
          target:'http://43.138.110.35:9007',
          changeOrigin: true,
          pathRewrite: {
            '^/hongyun-training': ''
          }
      },
      '/hongyun-user':{
            // target: 'http://192.168.0.121:19999',
          target: 'http://43.138.110.35:9007',
          changeOrigin: true,
          pathRewrite: {
            '^/hongyun-user': ''
          }
      },
      '/tug-api':{
            target: 'http://192.168.0.117:8081',
          // target: 'http://43.138.110.35:9007',
          changeOrigin: true,
          pathRewrite: {
            '^/tug-api': ''
          }
      },
      '/api':{
            // target: 'http://192.168.0.121:19999',
            target: 'http://43.138.110.35:9007',
            changeOrigin: true,
            pathRewrite: {
            '^/api': ''
            }
        }
    }
  },
})
